﻿using FireStarter.Base;
using Firestarter.DB.Schema.BO;
using Firestarter.DB.Schema.UI;
using Habanero.Base;
using NUnit.Framework;

namespace Firestarter.DB.Schema.Test.UI
{
    [TestFixture]
    public class TestRenamedMergableBoCollectionBuilder : TestBase
    {
        [Test]
        public void Test_Construct()
        {
            //---------------Set up test pack-------------------
            DBDatabase database = new DBDatabase();

            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            RenamedMergableBoCollectionBuilder builder = new RenamedMergableBoCollectionBuilder(database);

            //---------------Test Result -----------------------
            Assert.IsNotNull(builder);
        }

        [Test]
        public void Test_CreateBoCollection_WhenPassedADBTable_ShouldReturnBoCollectionOfDBTables()
        {
            //---------------Set up test pack-------------------
            DBDatabase database = new DBDatabase();
            DBTable table = new DBTable("table") {PendingChangeType = ChangeType.Add};
            
            RenamedMergableBoCollectionBuilder builder = new RenamedMergableBoCollectionBuilder(database);
            IBusinessObjectCollection boCol = null;

            //---------------Assert Precondition----------------
            Assert.IsNull(boCol);
            //---------------Execute Test ----------------------
            boCol = builder.CreateBoCollection(table);

            //---------------Test Result -----------------------
            Assert.IsNotNull(boCol);
        }


        //[Test]
        //public void Test_CreateBoCollection_WhenPassedADBTable_ShouldReturnBoCollectionOfDBTables()
        //{
        //    //---------------Set up test pack-------------------
        //    DBDatabase database = new DBDatabase();
        //    DBTable table = new DBTable("table") { PendingChangeType = ChangeType.Add };

        //    RenamedMergableBoCollectionBuilder builder = new RenamedMergableBoCollectionBuilder(database);
        //    IBusinessObjectCollection boCol = null;

        //    //---------------Assert Precondition----------------
        //    Assert.IsNull(boCol);
        //    //---------------Execute Test ----------------------
        //    boCol = builder.CreateBoCollection(table);

        //    //---------------Test Result -----------------------
        //    Assert.IsNotNull(boCol);
        //}

    }
}
